package com.yamed.bus.web.vo;

import java.math.BigDecimal;

/**
 * @Author: wchen
 * @Description:
 * @Date: Created in 2019-07-18 16:06
 * Copyright 本内容仅限于杭州阿拉丁信息科技股份有限公司内部传阅，禁止外泄以及用于其他的商业目的
 */
public class PromoteApkCountVO {

    private String promoteCode;
    private String promoteUrl;
    private Integer clickCount;
    private Integer downloadCount;
    private String clickToDownload;


    public String getPromoteCode() {
        return promoteCode;
    }

    public void setPromoteCode(String promoteCode) {
        this.promoteCode = promoteCode;
    }

    public String getPromoteUrl() {
        return promoteUrl;
    }

    public void setPromoteUrl(String promoteUrl) {
        this.promoteUrl = promoteUrl;
    }

    public Integer getClickCount() {
        return clickCount;
    }

    public void setClickCount(Integer clickCount) {
        this.clickCount = clickCount;
    }

    public Integer getDownloadCount() {
        return downloadCount;
    }

    public void setDownloadCount(Integer downloadCount) {
        this.downloadCount = downloadCount;
    }

    public String getClickToDownload() {
        BigDecimal clickToDownload = new BigDecimal(0);
        if(this.clickCount > 0){
           clickToDownload = new BigDecimal(this.downloadCount * 100).divide(new BigDecimal(this.clickCount), 2);
        }

        return clickToDownload.toString() + "%";
    }

}
